package com.heqiang.spring.context.support;

import com.heqiang.spring.BeansException;

public class ClassXmlApplicationContext extends AbstractXmlApplicationContext {

    private String[] configLocations;

    public ClassXmlApplicationContext() {

    }

    public  ClassXmlApplicationContext(String configLocation) throws BeansException {
       this(new String[]{configLocation});
    }

    /**
     *从xml中加载BeanDefinition,并刷新上下文
     * @param configLocations
     * @throws BeansException
     */
    public  ClassXmlApplicationContext(String[] configLocations) throws BeansException {
        this.configLocations = configLocations;
        refresh();
    }




    @Override
    protected String[] getConfigLocations() {
        return configLocations;
    }

}
